<?xml version='1.0' encoding='UTF-8' ?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/templates/template.xhtml"
                xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:define name="title"><h:outputText value="Invigilate Exam List" /></ui:define>
    
    <ui:define name="content">
        <h:form id="invigilateExamList">  
        <p:fieldset styleClass="fieldset" legend="Exam List">
            <p:dataTable id="examList" var="exam" value="#{invigilateExamListView.examList}" selectionMode="single" selection="#{invigilateExamListView.selectedExamSession}" rowKey="#{exam.id}">
        <f:facet name="header">
            Exam List
        </f:facet>
        <p:column headerText="Exam Paper">
            <h:outputText value="#{exam.examPaperId.name}" />
        </p:column>
        <p:column headerText="Start Time">
            <h:outputText value="#{exam.dateTime}" />
        </p:column>
        <p:column headerText="Duration">
            <h:outputText value="#{exam.duration}" />
        </p:column>

        <f:facet name="footer">
            <p:commandButton process="examList" icon="ui-icon-search" value="View" action="/faces/invigilate/examStudentList" />
        </f:facet>
        </p:dataTable>
        </p:fieldset>
        </h:form>
        

    </ui:define>

</ui:composition>

